package cn.web.tunnelrobot.controller;

import cn.web.tunnelrobot.service.BigScreenService;
import cn.web.tunnelrobot.service.UserRecordService;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * 大屏展示
 * @version 1.0.0
 *
 */
//@Api(tags = "大屏展示")
@RestController
@RequestMapping("/bigScreen")
@Api(tags = "大屏展示")
@ApiSort(value = 3)
public class BigScreenController {
    @Autowired
    private BigScreenService bigScreenService;
    @Autowired
    private UserRecordService userRecordService;
    @GetMapping("/getProjectInfoList")
    @ResponseBody
    public HashMap<String,Object> getProjectInfoList(){
        return bigScreenService.getProjectInfoList();
    }
    @GetMapping("/getTodayWarning")
    @ResponseBody
    public HashMap<String,Object> getTodayWarning(){
        return bigScreenService.getTodayWarning();
    }
    @GetMapping("/getTmilepost")
    @ResponseBody
    public HashMap<String,Object> getTmilepost(){
        return bigScreenService.getTmilepost();
    }
    @GetMapping("/getSettlAndConvergence")
    @ResponseBody
    @ApiOperation(value = "无",notes = "近五日沉降收敛数据")
    public HashMap<String,Object> getSettlAndConvergence(){
        return bigScreenService.getSettlAndConvergence();
    }
    @GetMapping("/getInfoStatistical")
    @ResponseBody
    public HashMap<String, Object> InfoStatistical(){
        String operStartTime = "";
        String operEndTime = "";
        return userRecordService.InfoStatistical(operStartTime,operEndTime);
    }
    @GetMapping("/getSettlAndConvergenceStraightLine")
    @ResponseBody
    @ApiOperation(value = "无",notes = "沉降收敛折线图")
    public HashMap<String,Object> getSettlAndConvergenceStraightLine(){
        return bigScreenService.getSettlAndConvergenceStraightLine();
    }
}
